/*-------------------------------------------------------------------------

***************** Modification History ***********************************
   @doc
   @module Recptfrm.h - Header file for Receipt building functions |
   @end
   
$Log: /SoftPay/SPK2SIM/Source/Include/recptfrm.h $ 
 * 
 * 6     2/21/00 3:00p Jim_b4
 * Include file restructuring
 * 
 * 5     2/08/00 1:41p Kevin_v1
 * Moved logo to top of receipt, changed to print all header lines at once
 * for receipts and reports.
 * 
 * 4     1/25/00 9:52a Page_k1
 * Add fields to hold the merchant and shift into summary middle.
 * Add fields to hold the merchant  into detail middle.
 * 
 * 3     1/07/00 12:45p Monique_b1
 * Removed  vdGetHostReceiptFields
 * 
 * 2     1/06/00 4:42p Monique_b1
 * Removed the obPrinter parameter from inPrintReceiptTop and
 * inPrintReceiptBottom so that the function could be used in the form
 * table.
 * 
 * 1     7/19/99 5:42p Jim_b4
 * 
 * 1     7/19/99 4:27p Jim_b4
 * 
 * 2     6/09/99 11:20a Monique_b1
 * Change headers and file names for SP 2000
**************************************************************************

   Copyright (C) 1999 by VeriFone, Inc.

   All rights reserved.  No part of this software may be reproduced,
   transmitted, transcribed, stored in a retrieval system, or translated
   into any language or computer language, in any form or by any means,
   electronic, mechanical, magnetic, optical, chemical, manual or otherwise,
   without the prior written permission of VeriFone, Inc.

---------------------------------------------------------------------------*/

#ifndef VSRETFRM_H
#define VSRETFRM_H

#include <transact.h>
#include <print.h>

typedef struct
{
    char szTotalSaleCnt[INT_STR_SIZE + 1];
    char szTotalRefCnt[INT_STR_SIZE + 1];
    char szTotalTipCnt[INT_STR_SIZE + 1];
    char szTotalCBackCnt[INT_STR_SIZE + 1];
    char szTotalSurchgCnt[INT_STR_SIZE + 1];
    char szTotalTaxCnt[INT_STR_SIZE + 1];          /* bb1 */
    char szGrandCnt[INT_STR_SIZE + 1];
    char szGrandTotal[FORMATTED_AMOUNT_SIZE + 1];
    char szTotalSaleAmt[FORMATTED_AMOUNT_SIZE + 1];
    char szTotalRefund[FORMATTED_AMOUNT_SIZE + 1];
    char szTotalCBAmt[FORMATTED_AMOUNT_SIZE + 1];
    char szTotalSchgAmt[FORMATTED_AMOUNT_SIZE + 1];
    char szTotalTaxAmt[FORMATTED_AMOUNT_SIZE + 1]; /* bb1 */
    char szTotalTipAmt[FORMATTED_AMOUNT_SIZE + 1];
    char szClerkId[CLERK_ID_SIZE + 1];
	char szApprovalCode[AUTH_CODE_SIZE + 1];
	char szInvNum[INV_NUM_SIZE + 1];
    char szAcctNum[SML_ACCT_SIZE + 1];           /*  CHGED SIZE  HED 3/12/96 */
    char szCType[SML_CLABEL_SIZE + 1];           /*  CHGED SIZE  HED 3/12/96 */
	char szTransType[MESSAGE_SIZE + 1];
	char szExpDate[FORMATTED_EXP_DATE_SIZE + 1];
    char szAmt[FORMATTED_AMOUNT_SIZE + 1];         /* mb1 */
    char szTipAmt[FORMATTED_AMOUNT_SIZE + 1];    /* ADDED FIELD  HED 3/12/96 */
    char szCSymbol[CUR_SYMBOL_SIZE + 1];
    char szCashBack[FORMATTED_AMOUNT_SIZE + 1];
    char szCashTipAmt[FORMATTED_AMOUNT_SIZE + 1];
    char szAllTipAmt[FORMATTED_AMOUNT_SIZE + 1];	/* tip plus cash tip */
    char szTipPercent[INT_STR_SIZE + 1];
    char szShiftNumber[INT_STR_SIZE + 1];
    long lnTotalTipAmt;                              /* mb1 - to calculate tip totals */
    int  inTotalTipCount;
    char szTot[FORMATTED_AMOUNT_SIZE + 1];       /* Betty_B1 v1.3 */
    char szMerchantNum[MERCH_INDEX_SIZE + 1];
    
} DETAIL_REPORT_FORM_MIDDLE;

typedef struct
{    DETAIL_REPORT_FORM_MIDDLE srMid;
} DETAIL_REPORT_FORM;

typedef struct
{
    char szShiftNumber[INT_STR_SIZE + 1];
	char szClerkId[CLERK_ID_SIZE + 1];
    char szTransCnt[INT_STR_SIZE + 1];
	char szTransType[MESSAGE_SIZE + 1];
	char szTipAmt[FORMATTED_AMOUNT_SIZE + 1];
	char szTotAmt[FORMATTED_AMOUNT_SIZE + 1];
    char szTransAmt[FORMATTED_AMOUNT_SIZE + 1];
    char szTipCnt[INT_STR_SIZE + 1];
    char szCBackCnt[INT_STR_SIZE + 1];
    char szCBackAmt[FORMATTED_AMOUNT_SIZE + 1];
    char szBaseAmt[FORMATTED_AMOUNT_SIZE + 1];    /* Add KC1 1/27/98 */
} CLERK_REPORT_FORM_MIDDLE;

typedef struct
{
    CLERK_REPORT_FORM_MIDDLE srMid;
} CLERK_REPORT_FORM;

typedef struct
{
	char szCType[CLABEL_SIZE + 1];
	char szTransType[MESSAGE_SIZE + 1];
	char szCreditCount[INT_STR_SIZE + 1];
	char szDebitCount[INT_STR_SIZE + 1];
	char szAdjustCount[INT_STR_SIZE + 1];
	char szReversalCount[INT_STR_SIZE + 1];
	char szNetCount[INT_STR_SIZE + 1];
	char szCreditTotal[FORMATTED_AMOUNT_SIZE + 1];
	char szDebitTotal[FORMATTED_AMOUNT_SIZE + 1];
	char szAdjustTotal[FORMATTED_AMOUNT_SIZE + 1];
	char szReversalTotal[FORMATTED_AMOUNT_SIZE + 1];
	char szNetTotal[FORMATTED_AMOUNT_SIZE + 1];
    char szCSymbol[CUR_SYMBOL_SIZE + 1];
    char szTaxTotal[FORMATTED_AMOUNT_SIZE + 1];
    char szCashBackTotal[FORMATTED_AMOUNT_SIZE + 1];
    char szSurchrgeTotal[FORMATTED_AMOUNT_SIZE + 1];
    char szMerchantNum[MERCH_INDEX_SIZE + 1];
    char szShiftNumber[INT_STR_SIZE + 1];
#ifdef CASHCARD_DEFINED		//meca 20041023 -- fixed from cashcard O3750 -- to correct the problem for totals report -- start
   	char szSurChargeCount[INT_STR_SIZE + 1];
#endif  //CASHCARD_DEFINED		//meca 20041023 -- fixed from cashcard O3750 -- to correct the problem for totals report -- end
#ifdef CITI_SING //jrd 04292005
    char szEPPSaleCount[INT_STR_SIZE + 1];
    char szEPPSaleSurchrgeTotal[FORMATTED_AMOUNT_SIZE + 1];
#endif  //CITI_SING
} SUMMARY_REPORT_FORM_MIDDLE;


typedef struct
{
    SUMMARY_REPORT_FORM_MIDDLE srMid;
} SUMMARY_REPORT_FORM;


typedef struct
{
	char szClerkId[CLERK_ID_SIZE + 1];
	char szInvNum[INV_NUM_SIZE + 1];
    char szAcctNum[FORMATTED_PAN_SIZE + 1];
    char szCType[SML_CLABEL_SIZE + 1];
    char szAmt[FORMATTED_AMOUNT_SIZE + 1];
} OPENTAB_REPORT_FORM_MIDDLE;

typedef struct
{    OPENTAB_REPORT_FORM_MIDDLE srMid;
} OPENTAB_REPORT_FORM;

typedef struct
{
    char szShiftNumber[INT_STR_SIZE + 1];
	char szCreditTotal[FORMATTED_AMOUNT_SIZE + 1];
	char szDebitTotal[FORMATTED_AMOUNT_SIZE + 1];
	char szCreditCount[INT_STR_SIZE + 1];
	char szDebitCount[INT_STR_SIZE + 1];
	char szNetCount[INT_STR_SIZE + 1];
	char szNetTotal[FORMATTED_AMOUNT_SIZE + 1];
    char szCSymbol[CUR_SYMBOL_SIZE + 1];
} SHIFT_REPORT_FORM_MIDDLE;


typedef struct
{
    SHIFT_REPORT_FORM_MIDDLE srMid;
} SHIFT_REPORT_FORM;


typedef struct
{
    char szDebitCount[LONG_STR_SIZE + 1];
    char szDebitTotal[FORMATTED_AMOUNT_SIZE + 1];
    char szVoidCount[LONG_STR_SIZE + 1];
    char szVoidTotal[FORMATTED_AMOUNT_SIZE + 1];
    char szCreditCount[LONG_STR_SIZE + 1];
    char szCreditTotal[FORMATTED_AMOUNT_SIZE + 1];
    char szNetCount[LONG_STR_SIZE + 1];
    char szNetTotal[FORMATTED_AMOUNT_SIZE + 1];
} HOST_CAPTURE_CREDIT_FORM;
 
typedef struct
{
    char szDebitCount[LONG_STR_SIZE + 1];
    char szDebitTotal[FORMATTED_AMOUNT_SIZE + 1];
    char szCreditCount[LONG_STR_SIZE + 1];
    char szCreditTotal[FORMATTED_AMOUNT_SIZE + 1];
    char szNetCount[LONG_STR_SIZE + 1];
    char szNetTotal[FORMATTED_AMOUNT_SIZE + 1];
} HOST_CAPTURE_DEBIT_FORM;
 
typedef struct
{
    HOST_CAPTURE_CREDIT_FORM srCredit;
    HOST_CAPTURE_DEBIT_FORM srDebit;
    char szGrandCount[LONG_STR_SIZE + 1];
    char szGrandTotal[FORMATTED_AMOUNT_SIZE + 1];
} HOST_CAPTURE_REPORT_FORM;

void vdSetPrintHeaderCondition (TRANSACTION_OBJECT *pobTran, VS_BOOL fAllowRedPrint, VS_BOOL fUnused);
int inSetReceiptTopConditions (TRANSACTION_OBJECT *pobTran);
int inSetReceiptMiddleConditions (TRANSACTION_OBJECT *pobTran);
int inSetReceiptBottomConditions (TRANSACTION_OBJECT *pobTran);
int inMakeReceiptAmount(TRANSACTION_OBJECT *pobTran);
int inMakeReceiptTop (TRANSACTION_OBJECT *pobTran);
void vdBuildReceipt (TRANSACTION_OBJECT *pobTran);
int inMakeReceiptAfterResp (TRANSACTION_OBJECT *pobTran);
int inPrintReceiptHeader (TRANSACTION_OBJECT *pobTran);
VS_BOOL fPrintCloseTab(TRANSACTION_OBJECT *pobTran);
int inPrintReceiptTop (TRANSACTION_OBJECT *pobTran);
int inPrintReceiptMiddle (TRANSACTION_OBJECT *pobTran);
int inPrintReceiptBottom (TRANSACTION_OBJECT *pobTran);
int inPrintErrorMsg (TRANSACTION_OBJECT *pobTran);

#endif

